home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / Macintosh Tracker 1.20 / source / Server⁄Tracker 4.0 / Makefile < prev    next >
Encoding:
Makefile  |  1994-02-01  |  6.0 KB  |  236 lines  |  [TEXT/KAHL]

  1. # Makefile for any machine
  2. # - based on my newer makefile and the GREATE
  3. # modifications by Mike Battersby
  4. ###############################################################################
  5. #
  6. # CONFIGURATION OPTIONS
  7. #
  8.  
  9. # Choose your machine type. Possible types as of this version (4.0)
  10. # are
  11. #  hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi, soundblaster.
  12. MACHINE = sparc
  13.  
  14. # The name of your C compiler. For most machines this will be
  15. # either 'cc' or 'gcc'.
  16. CC = cc
  17.  
  18. # The suffix for object files. This will usually be .o, except for sgi (.j)
  19. O = .o
  20. OPTS=-c
  21. # O =.j
  22. # OPTS=-j
  23.  
  24. # User interface type. Right now, this is Unix as there are no alternatives.
  25. UI = Unix/./
  26.  
  27. # Destination directory for tracker binaries and manpage.
  28. #
  29. # If you don't wish to use the 'make install' and 'make install.man'
  30. # commands, you can ignore these.
  31. BIN_DIR = /usr/local/bin
  32. MAN_DIR = /usr/local/man
  33.  
  34. # How to install the binaries and manpage. If you have a unix system,
  35. # use the GNU install program if you have it, otherwise try 'cp'. For
  36. # non-unix systems, make this the command for copying a file with the
  37. # following syntax
  38. #  <program_name> <source_name> <destination_name>
  39. #
  40. # If you don't wish to use the 'make install' and 'make install.man'
  41. # commands, you can ignore this.
  42. INSTALL = install
  43.  
  44. # Permissions and user/group id's to install with. Non-unix users
  45. # should comment these out (alternatively, you can use these to
  46. # provide arguments for the above $(INSTALL) program). If you want
  47. # to install tracker setuid root (which will allow it to renice
  48. # itself when non-root users run it), change the "-m 755" below to
  49. # "-m 4755". If you do so, you must be root to run make install.
  50. #
  51. # If you don't wish to use the 'make install' and 'make install.man'
  52. # commands, you can ignore these.
  53. INST_BIN_OPT = -s -m 755 -o root -g root
  54. INST_MAN_OPT = -m 644 -o root -g root
  55. ###############################################################################
  56. #
  57. # C compiler flags and libraries for each machine.
  58. # Unless you are porting this to a new architecture, you shouldn't
  59. # need to change these (on the other hand, if you understand what you
  60. # are doing, go ahead!).
  61. #
  62.  
  63. CFLAGS_hpalib = +O3 +OS +ESlit
  64. LIBS_hpalib   = -lAt -lAlib -lm
  65. AUDIO_hpalib = Hpux/alib_
  66. CONFIG_hpalib = Hpux/
  67.  
  68. CFLAGS_hplow = -Ae +O3 -Wl, -a,archive -s
  69. LIBS_hplow=-lM
  70. AUDIO_hplow = Hpux/low_
  71. CONFIG_hplow = Hpux/
  72.  
  73. # yet another port to hp! This one might be the best yet.
  74. CFLAGS_hp3 = +O3 +OS +ESlit
  75. LIBS_hp3   = -lAt -lAlib -lm
  76. AUDIO_hp3 = Hpux/3_
  77. CONFIG_hp3 = Hpux/3_
  78.  
  79. CFLAGS_solaris = -O
  80. LIBS_solaris   = -lm
  81. AUDIO_solaris = Sparc/./
  82. CONFIG_solaris = Sparc/solaris_
  83.  
  84.  
  85. CFLAGS_sparc = -g -Bstatic
  86. LIBS_sparc   = -lm
  87. AUDIO_sparc = Sparc/./
  88. CONFIG_sparc = Sparc/
  89.  
  90. CFLAGS_dec = -O 
  91. LIBS_dec   = -lm -lAF
  92. AUDIO_dec = AF/
  93. CONFIG_dec = AF/dec_
  94.  
  95. CFLAGS_sgi = -j -O 
  96. LIBS_sgi   = -laudio -lm
  97. AUDIO_sgi = Sgi/
  98. CONFIG_sgi = Sgi/
  99.  
  100. CFLAGS_soundblaster = -O
  101. LIBS_soundblaster   = -lm
  102. AUDIO_soundblaster = Soundblaster/
  103. CONFIG_soundblaster = Soundblaster/
  104.  
  105. CFLAGS_linux = -N -O2 -funroll-loops
  106. LIBS_linux   = -lm
  107. AUDIO_linux = Linux/./
  108. CONFIG_linux = Linux/
  109.  
  110. CFLAGS_freebsd = -O6 -funroll-loops
  111. LIBS_freebsd = -lm
  112. AUDIO_freebsd = Linux/
  113. CONFIG_freebsd = Linux/
  114.  
  115. CFLAGS = $(CFLAGS_$(MACHINE))
  116. COPTS = $(OPTS) $(CFLAGS)
  117. LIBS = $(LIBS_$(MACHINE))
  118. CONFIG = $(CONFIG_$(MACHINE))
  119. AUDIO = $(AUDIO_$(MACHINE))
  120.  
  121. OBJ_TRACKER = main$O $(AUDIO)audio$O st_read$O commands$O \
  122. audio$O automaton$O player$O getopt$O open$O tools$O \
  123. dump_song$O setup_audio$O notes$O display$O \
  124. $(UI)ui$O prefs$O tags$O autoinit$O
  125.  
  126. OBJ_ANALYZER = analyzer$O st_read$O open$O dump_song$O tools$O notes$O \
  127. prefs$O autoinit$O ${UI}ui$O display$O
  128.  
  129. OBJ_SPLITMOD = split$O tools$O st_read$O dump_song$O open$O notes$O \
  130. display$O prefs$O autoinit$O $(UI)ui$O
  131.  
  132.  
  133. all:    config.h tracker randomize analyzer splitmod
  134.  
  135. config.h:
  136.     cp $(CONFIG)config.h config.h
  137.  
  138. install: 
  139.     $(INSTALL) $(INST_BIN_OPT) tracker $(BIN_DIR)
  140.     $(INSTALL) $(INST_BIN_OPT) randomize $(BIN_DIR)
  141.     $(INSTALL) $(INST_BIN_OPT) analyzer $(BIN_DIR)
  142.  
  143. install.man:
  144.     $(INSTALL) $(INST_MAN_OPT) docs/tracker.1 $(MAN_DIR)/man1/tracker.1
  145.  
  146.  
  147.  
  148. devel: 
  149.     -rm -f $(INSTALL_DIR)/dtracker $(INSTALL_DIR)/splitmod
  150.     cp tracker $(INSTALL_DIR)/dtracker
  151.     cp splitmod $(INSTALL_DIR)/splitmod
  152.  
  153. tracker: ${OBJ_TRACKER}
  154.     ${CC} -o tracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  155.  
  156. analyzer: ${OBJ_ANALYZER}
  157.     $(CC) -o analyzer ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
  158.  
  159. randomize: randomize.c
  160.     $(CC) -o randomize ${CFLAGS} randomize.c 
  161.  
  162. splitmod: ${OBJ_SPLITMOD}
  163.     $(CC) -o splitmod ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
  164.  
  165. main$O: main.c song.h
  166.     $(CC) ${COPTS} main.c
  167.  
  168. tools$O: main.c 
  169.     $(CC) ${COPTS} tools.c
  170.  
  171. $(AUDIO)audio$O: $(AUDIO)audio.c 
  172.     cd `dirname $(AUDIO)`; $(CC) -I.. ${COPTS} `basename $(AUDIO)`audio.c
  173.  
  174. $(UI)ui$O: $(UI)ui.c
  175.     cd $(UI); $(CC) -I.. ${COPTS} ui.c
  176.  
  177. split$O: split.c
  178.     $(CC) ${COPTS} split.c
  179.  
  180. open$O: open.c
  181.     $(CC) ${COPTS} open.c
  182.  
  183. audio$O: audio.c
  184.     $(CC) ${COPTS} audio.c
  185.  
  186. automaton$O: automaton.c song.h channel.h
  187.     $(CC) ${COPTS} automaton.c
  188.  
  189. getopt$O: getopt.c getopt.h
  190.     $(CC) ${COPTS} getopt.c
  191.  
  192. getopt1$O: getopt1.c getopt.h
  193.     $(CC) ${COPTS} getopt1.c
  194.  
  195. player$O: player.c song.h channel.h
  196.     $(CC) ${COPTS} player.c
  197.  
  198. st_read$O: st_read.c song.h
  199.     $(CC) ${COPTS} st_read.c
  200.  
  201. commands$O: commands.c channel.h song.h
  202.     $(CC) ${COPTS} commands.c
  203.  
  204. unix/termio$O: unix/termio.c
  205.     $(CC) ${COPTS} unix/termio.c
  206. dump_song$O: dump_song.c
  207.     $(CC) $(COPTS) dump_song.c
  208. analyzer$O: analyzer.c
  209.     $(CC) $(COPTS) analyzer.c
  210. setup_audio$O: setup_audio.c
  211.     $(CC) $(COPTS) setup_audio.c
  212. notes$O: notes.c
  213.     $(CC) $(COPTS) notes.c
  214.  
  215. display$O: display.c
  216.     $(CC) $(COPTS) display.c
  217.  
  218.  
  219. clean:
  220.     -rm $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize$O
  221.     -rm tracker randomize splitmod analyzer core 
  222.     -rm tracker.tar tracker.tar.Z tracker.lzh
  223.  
  224. export:
  225.     -rm tracker.tar.Z
  226.     -rm tracker.lzh
  227.     cd ..; lha a tracker/tracker.lzh tracker/*.[ch] \
  228.     tracker/*/*.[ch] tracker/*/Docs/* \
  229.     tracker/Amiga/server/*.[ch] \
  230.     tracker/man/* \
  231.     tracker/*akefile tracker/Docs/*
  232.     cd ..; tar cvf tracker/tracker.tar tracker/*.[ch] \
  233.     tracker/*/*.[ch] tracker/*/*/*.[ch] \
  234.     tracker/*/Docs/* \ tracker/man/* tracker/Docs/* tracker/*akefile
  235.     compress tracker.tar
  236.